<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    protected $table='user';
    protected $guarded=[];
    public function address(){
        return $this->hasMany('App\Http\Model\Address',"user_id");
    }
    public function orders(){
        return $this->hasMany('App\Http\Model\Orders',"user_id");
    }
    public function complateOrders(){
        return $this->hasMany('App\Http\Model\Orders',"user_id")->where('status','>','3');
    }
    public function record(){
        return $this->hasMany('App\Http\Model\Record','user_id');
    }
}
